<div id="login">
  <h2>欢迎使用记账管理系统</h2>
  <div id="loginBox">
    <input
      nz-input
      placeholder="请输入用户名"
      [(ngModel)]="user.username"
      style="height: 40rem; margin-bottom: 20rem"
    />
    <br />
    <nz-input-group [nzSuffix]="suffixTemplate">
      <input
        [type]="passwordVisible ? 'text' : 'password'"
        nz-input
        placeholder="请输入密码"
        [(ngModel)]="user.password"
      />
    </nz-input-group>
    <ng-template #suffixTemplate>
      <i
        nz-icon
        [nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
        (click)="passwordVisible = !passwordVisible"
      ></i>
    </ng-template>

    <button nz-button nzType="primary" (click)="login()">登录</button>
  </div>
</div>
